package com.example.springbootmybatismysqloracle.controller;

import com.example.springbootmybatismysqloracle.dto.User;
import com.example.springbootmybatismysqloracle.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author hsf
 * @date 2023/2/14 17:45
 */
@RestController
@RequestMapping("/test")
public class UserController {
    @Autowired
    private UserService userService;
    @GetMapping("/sql")
    public User test(){
        User user = userService.queryUser();
        System.out.println(user.toString());
        return user;
    }
}
